﻿#ifndef PST_JSONDEF_H
#define PST_JSONDEF_H

#include <qstring.h>
#include <qvector.h>
#include <qsharedpointer.h>

#include "PostEnumType.h"
#include "TextFileParser.h"

namespace pst
{
    struct HearderFileUniqueData
    {
        virtual ~HearderFileUniqueData() = 0;
    };
    using uniqueDataPointer = QSharedPointer<HearderFileUniqueData>;

    struct ResultDataInfo
    {
        QString filePath;
        FileDataTypes fileType;
        TextFileParser resultData;
    };
    using ResultDataPointer = QSharedPointer<ResultDataInfo>;

    struct HearderFileData
    {
        QString datafile_type;
        QString resultdata_type;
        QVector<QString> key;
        QString datafolder_path;
        uniqueDataPointer unique_data;
    };

    struct HearderFileInfo
    {
        QString result_type;
        QString headfile_name;
        QString headfile_path;
        HearderFileData hearderFileData;
    };

    struct OtherHearderFile : public HearderFileUniqueData
    {
        QString datafile_name;
        ResultDataPointer resultDataInfo;
    };

    struct SHearderFile : public HearderFileUniqueData
    {
        struct {
            QString frequency;
        }unit;
        QString data_type;
        QString datafile_name;
        ResultDataPointer resultDataInfo;
    };
}

#endif
